Skip to content

Added Generic instance for Date #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

eskimor
Copy link

@eskimor eskimor commented Mar 24, 2016

  • added two toString functions

+ added two toString functions
@eskimor
Copy link
Author

eskimor commented Mar 24, 2016

Oops - there is already a similar PR. Nevertheless - leaving it open as the instance is different.

@paf31
Copy link
Contributor

paf31 commented Mar 24, 2016

Date is not Generic since it's not a sum of products.

@garyb
Copy link
Member

garyb commented Mar 24, 2016

There's been some previous discussion on this, #22. I want to change the representation to just hold the millis, and that way we avoid any weirdness and makes a proper generic instance possible.

@eskimor
Copy link
Author

eskimor commented Mar 24, 2016

You guys are really fast. :-)

@paf31 : Would it make sense to add something like

SigNative String
SNative String

to GenericSignature / GenericSpine ? So we can represent native types?

Use case is for example generic JSON serialization/deserialization. As it currently fails completely if there is a single data type in the chain that has no Generic instance.

The above for JSDate would look something like

SigNative "JSDate"
SNative "2016-03-24T17:02:50.848060000000Z"

Similar instances could be written for all native types which have some string representation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants